package com.info.zhiduoduo.repository.mapper.system;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Condition;
import com.info.zhiduoduo.repository.entity.system.MonthBusinessGross;

import java.util.List;

public interface MonthBusinessGrossMapper extends BaseMapper<MonthBusinessGross> {

	default MonthBusinessGross getByYearMonth(int year, int month) {
		return new MonthBusinessGross().selectOne(Condition.create().eq("year", year).eq("month", month));
	}

	default List<MonthBusinessGross> listByYear(int year) {
		return new MonthBusinessGross().selectList(Condition.create().eq("year", year).orderBy("month"));
	}
}
